import request from '@/utils/request'

export function allDepartmentList (query)  {
  return request({
    url: 'system/department/list',
    method: 'get',
    params: query
  })
}

// 删除用户
export function deleteDepartment(id) {
  return request({
    url: 'system/department/' + id,
    method: 'delete'
  })
}

export function addDepartment (data)  {
  return request({
    url: 'system/department/insertDepartment',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateDepartment(data) {
  return request({
    url: '/system/department',
    method: 'put',
    data: data
  })
}
